#include "calClient.hpp"

#include <iostream>
#include <memory>
#include <cstring>
using namespace Client;

// ./tcpClient serverip serverport

void Usage(const std::string &proc)
{
    std::cout << "\nUsage: \t" << proc << " serverip serverport" << std::endl;
}

int main(int argc, char *argv[])
{
    if (argc != 3)
    {
        Usage(argv[0]);
        exit(1);
    }
    std::string ip = argv[1];
    uint16_t port = atoi(argv[2]);
    std::unique_ptr<calClient> tcli(new calClient(ip, port));
    tcli->initClient();
    tcli->start();
    return 0;
}